package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SkplLikeMapper;
import com.ruoyi.system.domain.SkplLike;
import com.ruoyi.system.service.ISkplLikeService;

/**
 * 关联Service业务层处理
 *
 * @author ruoyi
 * @date 2022-06-15
 */
@Service
public class SkplLikeServiceImpl implements ISkplLikeService
{
    @Autowired
    private SkplLikeMapper skplLikeMapper;

    /**
     * 查询关联
     *
     * @param Id 关联主键
     * @return 关联
     */
    @Override
    public SkplLike selectSkplLikeById(Long Id)
    {
        return skplLikeMapper.selectSkplLikeById(Id);
    }

    /**
     * 查询关联列表
     *
     * @param skplLike 关联
     * @return 关联
     */
    @Override
    public List<SkplLike> selectSkplLikeList(SkplLike skplLike)
    {
        return skplLikeMapper.selectSkplLikeList(skplLike);
    }

    /**
     * 新增关联
     *
     * @param skplLike 关联
     * @return 结果
     */
    @Override
    public int insertSkplLike(SkplLike skplLike)
    {
        skplLike.setCreateTime(DateUtils.getNowDate());
        return skplLikeMapper.insertSkplLike(skplLike);
    }

    /**
     * 修改关联
     *
     * @param skplLike 关联
     * @return 结果
     */
    @Override
    public int updateSkplLike(SkplLike skplLike)
    {
        skplLike.setUpdateTime(DateUtils.getNowDate());
        return skplLikeMapper.updateSkplLike(skplLike);
    }

    /**
     * 批量删除关联
     *
     * @param Ids 需要删除的关联主键
     * @return 结果
     */
    @Override
    public int deleteSkplLikeByIds(Long[] Ids)
    {
        return skplLikeMapper.deleteSkplLikeByIds(Ids);
    }

    /**
     * 删除关联信息
     *
     * @param Id 关联主键
     * @return 结果
     */
    @Override
    public int deleteSkplLikeById(Long Id)
    {
        return skplLikeMapper.deleteSkplLikeById(Id);
    }
}
